/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package mx.itsc.mec.modelo;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Juanky
 */
@Entity
@Table(name = "area_interes_curso")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "AreaInteresCurso.findAll", query = "SELECT a FROM AreaInteresCurso a"),
    @NamedQuery(name = "AreaInteresCurso.findById", query = "SELECT a FROM AreaInteresCurso a WHERE a.id = :id"),
    @NamedQuery(name = "AreaInteresCurso.findByCurso", query = "SELECT a FROM AreaInteresCurso a WHERE a.curso = :curso"),
    @NamedQuery(name = "AreaInteresCurso.findByAreaInteres", query = "SELECT a FROM AreaInteresCurso a WHERE a.areaInteres = :areaInteres")})
public class AreaInteresCurso implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Integer id;
    @Basic(optional = false)
    @NotNull
    @Column(name = "curso")
    private int curso;
    @Basic(optional = false)
    @NotNull
    @Column(name = "area_interes")
    private int areaInteres;

    public AreaInteresCurso() {
    }

    public AreaInteresCurso(Integer id) {
        this.id = id;
    }

    public AreaInteresCurso(Integer id, int curso, int areaInteres) {
        this.id = id;
        this.curso = curso;
        this.areaInteres = areaInteres;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public int getCurso() {
        return curso;
    }

    public void setCurso(int curso) {
        this.curso = curso;
    }

    public int getAreaInteres() {
        return areaInteres;
    }

    public void setAreaInteres(int areaInteres) {
        this.areaInteres = areaInteres;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof AreaInteresCurso)) {
            return false;
        }
        AreaInteresCurso other = (AreaInteresCurso) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "mx.itsc.mec.modelo.AreaInteresCurso[ id=" + id + " ]";
    }
    
}
